docs(adr): ADR-0101 — MCP stdio principal admission (env API-key identity, fail-closed, no system bypass)#3250
Merged
Conversation
…tity, fail-closed, no system bypass) Records the decision closing the platform's last identity-less execution surface: the long-lived MCP stdio transport, which bridges the raw metadata service + data engine with no per-request principal (the `mcp-stdio-authority` conformance row's ADMISSION REQUIREMENT). - D1: stdio's identity is an env-supplied API key (OS_MCP_STDIO_API_KEY), resolved through the same @objectstack/core verify chain as HTTP/REST, and threaded as the ExecutionContext every stdio data read runs under (per-call, so revocation applies live). - D2: fail-closed — stdio auto-start without a valid key refuses to start; the HTTP surface is unaffected. - D3: no `system` bypass mode — full authority is a provisioned+minted key (attributable, revocable, scoped), never an identity-skipping switch. Records why (industry alignment: MCP spec env-credential model, Postgres/GitHub MCP servers, Anthropic's agent-identity model) so nobody re-invents it. Status: Proposed. Implementation tracked in #3246. Extends ADR-0096; sibling to the consume-side spawn policy (#3055). Refs #3246, #3167, #3228, #3217, ADR-0096, ADR-0036. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0115eg8dAaCfWaDYYAm3ma36
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
os-zhuang
marked this pull request as ready for review
July 19, 2026 05:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
记录关闭平台最后一个无身份执行面的决策:长驻 MCP stdio 传输——它把裸 metadata 服务 + data engine 桥到长驻 server(
record_by_idresource 直接dataEngine.findOne(...),无 ExecutionContext → 绕过 RLS/FLS/租户)。这正是mcp-stdio-authority矩阵行 note 里写明的 ADMISSION REQUIREMENT。纯文档(ADR),Status: Proposed——先把决策摆上桌评审;实现(v1)单独走,tracked in #3246。
三个决策
OS_MCP_STDIO_API_KEY),经@objectstack/core与 HTTP/REST 同一条 verify 链解析成 EC,线进每次 stdio 数据读(逐调用重解析,吊销即时生效)。system旁路。要满权就给平台管理员/专用 service 身份 mint 一个 key(可审计、可吊销、可轮换、按 posture scope),而不是一个跳过身份的开关。ADR 里用一张对比表 + "naming a fall-open doesn't make it not a fall-open" 记录了否决理由,避免半年后有人重新发明OS_MCP_STDIO_IDENTITY=system。三方证据(ADR 内引用)
MCP 规范(stdio 不做传输认证、后端凭据从 env 供给)· Postgres/GitHub MCP server(按供给凭据 scope,superuser 也得显式供给)· Anthropic agent-identity 模型(admin 预置的 scoped、可吊销 service 身份)。ObjectStack 当前 stdio 比这三者都松(无凭据即满权)——本决策把它拉齐。
关系
os devconnect UX + exposure-policy docs #3217 / feat(cli): make optional-plugin loading intent-driven, fail-fast on declared-but-missing (#1597) #3228 落地);本项是 decision: default wiring for the serve-side MCP server (@objectstack/mcp) in dev — identity admission first #3167 明确 defer 的最后一块。验收
ADR 合入 = 决策 Accepted;随后 #3246 落地 v1 时
mcp-stdio-authority从experimental→enforced。Refs #3246(实现)、#3167、#3217、#3228、#3055、ADR-0096、ADR-0036。
🤖 Generated with Claude Code
https://claude.ai/code/session_0115eg8dAaCfWaDYYAm3ma36
Generated by Claude Code